<!DOCTYPE html>
<!--conf
<sample>
              <product version="4.0b1" edition="std"/>
                     <modifications>
                            <modified date="130911"/>
                     </modifications>
               </sample>
-->
<html>
<head>
	<title>onFocusChanged event</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<style>
		 div#editorObj {
		 	 width: 100%;
		 	 height: 300px;
		 	 border: 1px solid #a4bed4;
		 }
		 div#logsHere {
			position: relative;
			height: 100px;
			border: #dddddd 1px solid;
			padding: 4px;
			margin: 30px 10px 10px 10px;
			font-size: 12px;
			font-family: Tahoma;
			overflow: auto;
		}
	</style>
	<script>
		var myEditor;
		function doOnLoad() {
			myEditor = new dhtmlXEditor({
				parent: "editorObj",
				contentHTML: "../common/cont.html"
			});
			myEditor.attachEvent("onFocusChanged", function(state){
				writeLog("onFocusChanged event fired");
			});
		}
		function writeLog(text) {
			document.getElementById("logsHere").innerHTML += "<br>"+text;
			document.getElementById("logsHere").scrollTop = document.getElementById("logsHere").scrollHeight;
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div id="editorObj"></div>
	<div id="logsHere">Logs here:</div>
</body>
</html>